﻿
declare @roleId uniqueidentifier

select @roleId = '8ce85f6b-902b-46d9-818f-d96a9288abf4'

Select '
	if not exists(select roleId from [medianamik_Role] where RoleId = '''+cast(RoleId as varchar(38))+''')
	begin
		INSERT INTO [dbo].[medianamik_Role]
				   ([RoleId]
				   ,[Name])
			 VALUES
				   ('''+cast(RoleId as varchar(38))+'''
				   ,'''+[Name]+''')		
	end'
from [dbo].[medianamik_Role]
		where RoleId = @roleId
		